The complexity of modern integrated circuits and the high cost of fabricating prototypes has led to the development of a class of computer programs that simulate the operation of a circuit. These simulators aid the designer in determining the proper bias voltages to be applied to the various components and in verifying the operation of the circuit before resources are committed to the fabrication of prototypes.
The circuit to be simulated is typically described in terms of a list of nodes and the components connected to each node. The user may actually provide a net list or a graphical representation of the circuit from which the program derives the net list. Each component may be viewed as a device that sources or sinks a current whose value is determined by the voltage at the node to which it is connected, and possibly, by the previous voltages at the node in question. The user may define particular components or utilize a library of standard components provided with the simulation program.
The simulation program finds the set of node voltages that lead to a circuit in which the sum of the currents at each node is zero. This is the voltage at which the currents provided by components that are the source of currents is exactly matched by the currents sinked by the remaining components. Each component is described by a subroutine that provides the current sinked or sourced by the component in response to an input voltage. As will be explained in more detail below, the component subroutines may also provide the first derivatives of the current with respect to the node voltages. In addition, the output of a component subroutine may depend on the history of the node to which the corresponding component is connected. For example, if the component contains inductors or capacitors, than the current will depend on the node voltage and the rate of change of the node voltage with time. The rate of change of the node voltage may be computed from the previous values of the node voltages, i.e., the "history of the nodes".
The simplest type of simulation determines the steady state behavior of the circuit, i.e., its DC operating conditions. Such simulations are particularly useful in setting various bias voltages on key nodes in the circuit. Under steady-state conditions, the solution of the simulation problem typically reduces to the solution of a system of non-linear equations that must be solved by some iterative approach such as Newton-Raphson iteration. The number of equations in the system is at least N, where N is the number of nodes in the circuit.
The simulation of the circuit under transient or large signal operating conditions is substantially more complex. Typically, the designer wishes to determine the voltage as a function of time at one or more nodes in the circuit when an input node is connected to a voltage source that varies with time. As noted above, one or more of the circuit components will sink or source currents whose value depends on the rate of change of the node voltage as well as the node voltage itself. Hence, the requirement that the currents entering a node are balanced by the currents leaving the node leads to system of differential equations. A circuit having N nodes is now described by a system of at least N equations. Furthermore, the equations corresponding to devices having inductors or capacitors will be differential equations.
Numerical methods for solving such systems of non-linear differential equations are known. These methods typically require an iterative process at each time point. Hence, the solution of the transient simulation problem is substantially more complex computationally than the solution of the DC simulation.
Furthermore, the solution must be repeated at each time point. The spacing of the time points is typically determined by the highest frequency expected at any node having a component connected thereto whose output depends on the rate of change of the node voltage, i.e. the first derivative of the node voltage. The first derivative is determined by fitting the current node voltage and one or more previous node voltages to a curve. The slope of the curve is then used as an approximation to the first derivative. If successive time points are too far apart, the approximation will lead to a significant error in the first derivative. It should be noted that such an error is equivalent to making an unknown error in an inductor or capacitor value in the circuit. Hence, simulations of transients will have errors that increase with the time step size. Thus, the required number of steps per second may be an order of magnitude higher than the highest frequency at the most sensitive node.
Consider a simulation in which the input signal to the circuit is a 10 kHz modulation of a 10 GHz microwave signal. To view the circuit response over 10 cycles of the modulation envelope, i.e., one millisecond, with a step size equal to one tenth the period of the carrier, the circuit behavior must be computed at 100 million time points. If the behavior at each of 1000 nodes is to be recovered, the storage space for the results alone becomes a problem.
If the input wave form is periodic, the computational difficulty can be substantially reduced using harmonic balancing methods for computing the behavior of the circuit. In this case, the input signal may be written as a sum of sinusoids having fixed amplitudes. Each circuit component must provide the current sourced or sinked by that component in response to each of the sinusoids at the node connected to the component. If the input signal is represented by 10 sinusoids, the component must provide 10 current values plus the currents at harmonics of these values. It should be noted that each current is a complex number representing the current's amplitude and phase. The currents at the harmonics are needed because a non-linear device may excite one or more harmonics of an input signal. The simulation problem is then reduced to solving a set of non-linear equations in which the currents entering and leaving each node at each frequency are balanced.
The harmonic balance technique provides its advantages by eliminating the need to compute solutions at each time point. In this case, the solution of the system of non-linear equations provides the steady state solution to the simulation problem. However, the system of equations is now n times larger, where n is the number of harmonics for which each device must provide current data. Hence, the harmonic balance technique is limited to simulations for which the available computing system can solve a system of equations of order nN, where N is the number of nodes.
In addition, as noted above, the harmonic balance method is also limited to those situations in which the input signal is periodic. In many situations of interest, the input signal is not periodic. For example, the modulation of a carrier by a data stream is typically leads to a non-periodic waveform. These problems can only be solved by time-domain analysis. As noted above, if the carrier frequency is much higher than the modulation frequency, the number of time points needed to simulate the circuit using time-domain analysis becomes prohibitively large. Hence, there is a large class of problems for which both time-domain and harmonic balance simulators are less than satisfactory.
Two other related prior art methods, the mixed frequency-time (MFT) method and the envelope following method, have been developed in an attempt to overcome the above described problems. Both these techniques rely on being able to iteratively solve for the complete waveform over one clock period using basic time domain integration techniques. Several clock cycles are then skipped before another clock period segment is solved. These techniques reduce the number of time points for which solution must be computed. However, the computational difficulty is substantially increased because there are now boundary relationships that must also be satisfied between one clock period segment and the adjacent clock period segments. The MFT approach assumes the waveform, after being sampled at the clock rate, can be represented by a small number of harmonics n. This sampled waveform can then be represented by 2*n-1 time samples. For each of these time samples, the circuit equations are integrated from the initial values to obtain the values one clock period later. Fourier techniques are then used to delay the set of initial values one clock period. Both these sets of delayed values must be equal, so a set of nonlinear equations are defined that equate these values to each other. This set of nonlinear equations is then solved with Newton-Raphson-based shooting methods. This requires not only repeatedly integrating the circuit equations but also repeatedly computing the sensitivities of the integrated results. If the number of harmonics n is large, solving this large set of equations can be become quite time consuming, and the benefit gained by not having to solve the circuit equations for every clock period can be lost. As with harmonic balance simulation, this MFT approach is practically limited to finding the steady state solution when a relatively few number of harmonics and tones of the sampled waveform are present, and its speed and efficiency is a strong function of how linearly the circuit is behaving from one time sample to the next.
The envelope following method is similar to the MFT in that it requires the integration of the circuit equations over a complete clock period, along with the sensitivities, but instead of using frequency domain techniques, it uses a "differential-like" time domain equation to relate the solution at one clock period to the solution several clock periods earlier. The number of clock periods that can be skipped depends on how rapidly the envelope is changing. In order for this to a be a stable algorithm, an implicit integration analogous to backward-Euler must be used. As a result, the method becomes an iterative process, and the circuit equations and sensitivities for the single clock period may have to be integrated multiple times.
Both the above techniques rely on being able to solve the circuit equations over single clock periods in the time domain. This constraint limits the methods to circuit models with lumped elements, i.e.. capacitors and inductors, because the models cannot use convolution or require past history information, since past history is not available for those clock periods that are skipped. Such models cannot accurately describe many circuits used in high-frequency communication circuits. The MFT approach cannot handle true transient or very complex modulation waveforms. Both approaches, in order to achieve the convergence rate of Newton-Raphson techniques, require the computation of a time domain sensitivity matrix which is expensive to compute and requires the inversion of a full, rather than a sparse, matrix. In addition, both these approaches just generate time domain waveforms. Basic envelope information, such as instantaneous magnitude, phase or I/Q, is not available, either for use in the simulation itself or for convenient display. The generation of this information requires another time consuming postprocessing step.
Broadly, it is the object of the present invention to provide an improved method for simulating an electronic circuit on a computer.
It is a further object of the present invention to provide a simulator that can simulate multiple modulated carriers and harmonics in which the modulation frequencies are small compared to the carrier frequencies.
It is yet another object of the present invention to provide a simulator that is not limited to circuit models having lumped elements.
These and other objects of the present invention will become apparent to those skilled in the art from the following detailed description of the invention and the accompanying drawings.